<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>栏目添加页面</title>
<link rel="stylesheet" href="${base}/css/channel/main.css" />
<link rel="stylesheet" href="${base}/css/validationEngine.jquery.css" type="text/css"/>
<script type="text/javascript" src="${base}/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="${base}/js/lhgdialog/lhgdialog.min.js"></script>
<script type="text/javascript" src="${base}/js/jquery.validationEngine.js"></script>
<script type="text/javascript" src="${base}/js/jquery.validationEngine-zh_CN.js"></script>
<script type="text/javascript" src="${base}/js/jquery.blockUI.js"></script>
<script type="text/javascript" src="${base}/js/jquery.form.js"></script>
<script type="text/javascript" src="${base}/js/channel/channel.js"></script>
<script type="text/javascript">
	var base = '${base}';
</script>
<script type="text/javascript" charset="utf-8">
    window.UEDITOR_HOME_URL = "${base}/ueditor/";  //UEDITOR_HOME_URL、config、all这三个顺序不能改变
</script>
<script type="text/javascript" src="${base}/ueditor/editor_config.js"></script>
<script type="text/javascript" src="${base}/ueditor/editor_all_min.js"></script>
<script type="text/javascript">
/**
 * 初始化表单验证
 */
$(function () {
	if(document.dataForm){
		$("#dataForm").validationEngine({
		onValidationComplete: function(form, status){
	        if (status == true) {                   
	            form.validationEngine('detach');
	            form.submit();
	       	 }else{
	       		 $.unblockUI();
	       	 }
			}       
		});
	};
});
var parentId='${(pChannel.channelId)!}';
var pTitle='${(pChannel.title)!}';
</script>
</head>
<body>
<form action="${base!}/channel/save.htm" method="post" id="dataForm" name="dataForm">
<input type="hidden" name="parentId" id="parentId" value="${(pChannel.channelId)!}"/>
<div class="titbg02">
<strong class="fl">新增栏目</strong>
	<a  href="#" id="cancel_button" onclick="cancel()" class="fr"><img border="0" align="absmiddle" src="${base}/images/common/cancel.png">&nbsp;取消&nbsp; &nbsp;</a>
	<a  href="#" id="reset_button" onclick="reset()"  class="fr"><img border="0" align="absmiddle" src="${base}/images/common/reset.png">&nbsp;重置&nbsp; &nbsp;</a>
	<a  href="#" id="save_button"  class="fr" onclick="formSave()"><img border="0" align="absmiddle" src="${base}/images/common/diary.png">&nbsp;保存&nbsp; &nbsp;</a>
</div>
<table border="0" cellspacing="1" cellpadding="2" class="taball" >
<tbody>
<tr>
<th><span class="red">*</span>上级栏目:</th>
<td>
<input type="text" class="w150" value='${(pChannel.title)!}' id="pTitle" readonly="readonly" disabled="disabled"/>
<label><input type="checkbox" id="topChannel" onclick="changeTop()"/>是否顶级栏目</label>
</td>
<th>
<span class="red">*</span>栏目标题:
</th>
<td>
<input type="text" class="validate[required] w150" name="title"/>
</td>
</tr>
<tr>
<th><span class="red">*</span>栏目类别:</th>
<td colspan="1">
<select onchange="changeChannelType(this.value)" name="channelType" id="channelType">
<option value="1">新闻</option>
<option value="2">单页</option>
</select>
</td>
<th>栏目模板:</th>
<td colspan="1">
<select name="model">
</select>
</td>
</tr>
<tr>
<th>访问地址:</th>
<td colspan="1">
<input type="text" class="w150" name="accessUrl"/>
</td>
<th>首页版位:</th>
<td colspan="1">
<select name="priority">
<option value="0">无</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</td>
</tr>
<tr id="txt_tr_id" style="display: none">
	<th>栏目内容:</th>
	<td  colspan='3'>			
	<textarea  name="txt" id = "ueditTxt"  ></textarea>
	<script type="text/javascript">
			var editor = new UE.ui.Editor({ initialFrameWidth:640 , minFrameHeight:200  });
 					        editor.render("ueditTxt");
			editor.ready(function(){//需要ready后执行，否则可能报错
				    editor.setContent("");
			})
	</script>
	</td>
</tr>
</tbody></table>
</form>
</body>
</html>